package com.kaiyiweitong.tongxing.activity.login;

import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.KeyEvent;
import android.widget.TextView;

import com.kaiyiweitong.tongxing.R;
import com.kaiyiweitong.tongxing.base.BaseActivity;

import butterknife.Bind;
import butterknife.OnClick;

/**
 * Created by Administrator on 2017/12/16 0016.
 */

public class RegisterSuccessActivity extends BaseActivity {
    @Bind(R.id.confirm_tv)
    TextView mConfirmTv;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_register_success);
    }

    @OnClick(R.id.confirm_tv)
    public void onViewClicked() {
        toLogin();
    }

    private void toLogin() {
        Intent intent = new Intent(this, LoginActivity.class);

        startActivity(intent);
    }

    @Override
    public boolean onKeyDown(int keyCode, KeyEvent event) {
        if (keyCode == KeyEvent.KEYCODE_BACK) {
            toLogin();             //自己处理按键事件
            return false;
        }
        return super.onKeyDown(keyCode, event);
    }
}
